package org.cardoso.persistence;

import java.util.List;

import javax.persistence.EntityManager;

import org.cardoso.persistence.filter.QueryFilter;

/**
 * 
 * @author Jose Henrique Cardoso
 *
 */
public interface Persistence<T> {

	public void save(T entity);

	public void setEntityManager(EntityManager entityManager);
	
	public void remove(T entity);
	
	public T getEntity(Long id);
	
	@SuppressWarnings("rawtypes")
	public T getEntity(Class entityClass, Long id);
	
	public Long count();
	
	public List<T> find();
	
	public Long count(QueryFilter queryFilter);
	
	public List<T> find(QueryFilter queryFilter);
	
}